#!/system/bin/sh
[[ -d /data/media/0/Download ]] && path="Download" || path="download"
Version="202104061601"
# 更新: 旧版tgx

Download()
{
	local a="/data/media/0/$2"
	local aa="$2"
	local b="/data/media/0/$path/第三方应用下载目录/$1"
	local c="/storage/emulated/0/$path/第三方应用下载目录/$1"

	Link() {
		[[ ! -d "$b" ]] && mkdir -p "$b"
		mount --bind "$L" "$b"
		mount --bind "$L" "$c"
		chcon u:object_r:media_rw_data_file:s0 "$L"
		chown media_rw:media_rw "$b"
		chown media_rw:media_rw "$c"
		}

	if [[ -d $a ]]; then
		echo "存在路径: $1"
		L="$a"
		Link
	elif [[ -d $aa ]]; then
		echo "存在路径: $1"
		L="$aa"
		Link
	fi
}

Download 'QQ' 'Android/data/com.tencent.mobileqq/Tencent/QQfile_recv'
Download 'TIM' 'Android/data/com.tencent.tim/Tencent/TIMfile_recv'
Download '酷安' 'Android/data/com.coolapk.market/files/Download'
Download 'IDM+' 'IDMP'
Download '文叔叔' 'Wenshushu/Download'
Download '腾讯微云' '微云保存的文件'
Download '天翼云盘' 'ecloud'
Download '阿里云盘' 'AliYunPan'
Download '百度网盘' 'BaiduNetdisk'
Download '神奇磁力' 'Android/data/com.magicmagnet/files'
Download '浩克下载' '浩克下载/Download'
Download '夸克浏览器' 'Quark/download'
Download 'QQ浏览器' 'QQBrowser'
Download 'NeKogram' 'Android/data/nekox.messenger/files/documents'
Download 'TG' 'Telegram/Telegram Documents'
Download 'TG-X' 'Android/data/org.thunderdog.challegram/files/documents'
Download 'TG-X' 'Android/data/taipei.sean.challegram'
Download 'X浏览器' 'Android/data/com.mmbox.xbrowser/files/downloads'
Download '微信' 'Android/data/com.tencent.mm/MicroMsg/Download'
Download '安卓壁纸' 'Android/data/com.androidesk/files/androidesk'
Download '搞机助手' '/data/data/Han.GJZS/files/Configuration_File/'


sleep 10